# 创建X和Y坐标值
import numpy as np
from matplotlib import pyplot as plt

x = np.linspace(0, 1023, 1024)
y = np.linspace(0, 1279, 1280)

# 使用meshgrid创建网格化的X和Y坐标矩阵
X, Y = np.meshgrid(x, y)
# att_4d = np.load('att_4d.npy', allow_pickle=True)
att_4d = np.load('att_4d_canon.npy', allow_pickle=True)

for i in range(len(att_4d)):
    att_3d = att_4d[i]
    for j in range(len(att_4d[i])):
        Z = att_3d[j]
        # 创建一个3D坐标轴
        fig = plt.figure()
        ax = fig.add_subplot(111, projection='3d')

        # 绘制3D曲面
        ax.plot_surface(X, Y, Z, cmap='viridis')

        # 设置坐标轴标签
        ax.set_xlabel('X Label')
        ax.set_ylabel('Y Label')
        ax.set_zlabel('Z Label')

        # 显示图形
        plt.show()
